/**
 * TabuList.java
 * ************************** 
 * @date May 12, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package gossipServices.bootstraping.tman.tabuList;

import gossipServices.basic.nodeDescriptors.NodeDescriptor;

/**
 * Description: 
 * The TabuList is used by the TMan algorithm with the aim to 
 * remember the last nodes contacted and don't contact 
 * them anymore until the are removed from the TabuList.
 * The TabuList has a fixed size that never increase nor decrease. 
 *
 */
public interface TabuList {
	
	/**
	 * Add the input NodeDescriptor to the TabuList.
	 * @param node
	 * @return
	 */
	public boolean add(NodeDescriptor node);
	
	/**
	 * Return true if the TabuList contains the 
	 * NodeDescriptor 'node' in input.
	 * @param node
	 * @return
	 */
	public boolean contains(NodeDescriptor node);
	
	/**
	 * Bound the size of the TabuList to 'maxSize'.
	 * @param maxSize
	 * @return
	 */
	public boolean boundSize(int maxSize);
	
	/**
	 * Return the 'maxSize' reachable for this TabuList.
	 * @return
	 */
	public int getMaxSize();
	
	/**
	 * Return the actual size of the TabuList.
	 * @return
	 */
	public int size();

}
